﻿using System;
using System.Web.Services;
using Dost.Khcn.Biz;
using Resources;

namespace Dost.Khcn.Web.ChuyenGia
{
    public partial class New : System.Web.UI.Page
    {
        #region Properties

        private static ChuyenGiaBiz _chuyenGiaBiz;
        private static ChuyenGiaBiz ChuyenGiaManager
        {
            get
            {
                return (_chuyenGiaBiz ?? (_chuyenGiaBiz = new ChuyenGiaBiz()));
            }
        }

        #endregion

        #region Events

        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void btnSave_Click(object sender, EventArgs e)
        {

        }

        #endregion

        #region WebMethods

        [WebMethod]
        public static object Create(Data.EntityModel.ChuyenGia chuyenGia)
        {
            chuyenGia = ChuyenGiaManager.CreateChuyenGia(chuyenGia);
            if (chuyenGia != null)
                return new { Result = "OK", Data = chuyenGia };
            return new { Result = "Error", Message = GlobalStrings.Error };
        }

        #endregion
    }
}